package com.umpay.controller.payment;

import com.umpay.business.payment.PaymentBusinessService;
import com.umpay.controller.base.AbstractController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/*******************************************************************
 * description : 查询订单POS订单详情
 * @author cxy
 * @date 2018年7月16日 下午4:36:17
 * @version 1.0
 *******************************************************************/
@RestController
public class MPOSPayController extends AbstractController{

	private static final Logger log = LoggerFactory.getLogger(MPOSPayController.class);
	
	 @Autowired
	 private PaymentBusinessService paymentBusiness;
	
	@PostMapping(value="/payment/mposPay")
	public Map<String, Object> mposPay(HttpServletRequest request,HttpServletResponse response) {
		Map<String, Object> req = getReqMessage(request);
		log.info(String.format("查询订单POS订单详情请求参数[%s]", req));
		Map<String, Object> message = this.paymentBusiness.mposPay(req);
		log.info(String.format("查询订单POS订单详情响应结果[%s]", message));
		return message;
		
	}
}
